import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.util.HashMap;
import java.util.LinkedList;

public class Trap {

    @Test
    public void test1() {
        Assertions.assertEquals(6, trap(new int[]{0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1}));
    }

    @Test
    public void test2() {
        Assertions.assertEquals(9, trap(new int[]{4, 2, 0, 3, 2, 5}));
    }


    public int trap(int[] height) {



        return 0;

    }

}
